-
Notifications
You must be signed in to change notification settings - Fork 56
Bulk milestone updates #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Feature/bulk milestone updates
- return all the milestones instead of object with "created", "updated" and "deleted" milestones
- disable logic of automatic updates other fields of milestones when we update some fields
allow non-admin users to set "completionDate" and "actualStartDate" during milestone updating if they are not yet set
# Conflicts: # docs/Project API.postman_collection.json # package-lock.json
# Conflicts: # src/routes/milestones/update.js
They not always work correctly.
# Conflicts: # src/routes/milestones/create.js # src/routes/milestones/delete.js # src/routes/milestones/update.js
This reverts commit f1d0f90.
- don't raise status change event on every milestone update - removed/commented redundant code for raising events during cascading updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, only thing I was concerned is backward compatibility. I know it is difficult to have that with these changes, but still I would like to give some more thoughts to it.
The thing that our main task here was to remove cascading updates that don't work well with our V5 ES/DB architecture. So backward compatibility got broken at the moment when we removed the cascading updates. The fact that we introduced a new bulk milestone updates doesn't harm. We can try to achieve the backward compatibility here, though I think it would make the code very knotted. Even before the logic was quite tricky, and removing cascading updates is a good step in making logic more straightforward here. But keeping both ways might make it even more cumbersome. Do we have some reasons for keeping backward compatibility? I know that other teams started using it. Though as timelines with milestones are completely outside of the project object, I hope other teams didn't start to load them. So if it's possible maybe we can try to confirm with them, that they don't use them yet. Btw, we also have some plans to refactor milestone spans to points as per appirio-tech/connect-app#3299 which could also break backward compatibility. |
Thanks for detailed explanation and it is clear now to me and it would be better for future to track back why we did this change and why it broke the backward compatibility.
Though, I am now convinced to do this without backward compatibility, I am still trying to think from future considerations when we would have many other consumers of the projects and timeline apis. Just trying to brainstorm the all possible ways to handle such situations in future. In this particular case, we might have backward compatibility for some time in future (After which it can be deprecated easily):
Yep, that is why I more worried about two breaking changes. It would have been great if we could have done this in single release. But I think that is difficult to achieve. |
I understand that not always we can make breaking changes and it would be always a trade-off. If it's harder to update API consumers to new API than keeping backward compatibility then we have to keep backward compatibility no matter how code would become more complex. Though keeping backward compatibility has its cost:
So if it's easier to update all the consumers or there are no consumers, it would better to drop backward compatibility. But if we cannot ask all the consumers to update to the new API we don't have other choice as to support backward compatibility. So it's not impossible, it just has some price to pay.
This would be the ideal situation which we should try to achieve if we have to keep backward compatibility somewhere. But in many situations, it's hard to encapsulate all such logic into events.
If we don't have a choice other then keeping backward compatibility then having a version for objects as you've suggested is one of the best approaches I think. Other possible approaches:
Yep, there are already many changes across 3 repos. It would hard not to break anything if we did more changes in a single step. In such a way we can control that we don't lose any functionality and it's easier to transit. . @vikasrohit let me know if we have to keep backward compatibility for milestones on this step, or this time we can drop it. |
I meant |
Implementation of bulk milestones update endpoint.
This PR shouldn't be merged until we do the relative changes client-side. This PR is created just to keep in mind that we have such a big change pending.